#ifndef __M_MSG_H__
#define __M_MSG_H__
#include "util.hpp"
#include "level.hpp"
#include <thread>


namespace mylog{
struct LogMsg {
    using ptr = std::shared_ptr<LogMsg>;
    size_t _line;//行号
    time_t _ctime;//时间
    std::thread::id _tid;//线程ID
    std::string _name;//日志器名称
    std::string _file;//文件名
    std::string _payload;//日志消息
    LogLevel::value _level;//日志等级
    LogMsg( LogLevel::value level,size_t line,const std::string &name, std::string file, std::string payload  )
		: _name(name),
		_file(file),
		 _payload(payload), 
		 _level(level),
        _line(line), 
		_ctime(util::date::now()),
		 _tid(std::this_thread::get_id())
		  { }
  
};
}

#endif